cmake_minimum_required(VERSION 3.4.1)
project(main LANGUAGES C)

set(MY_MICRO "-Wall -Wextra")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${MY_MICRO}")

add_library(main SHARED
    main.c
    ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c
)

target_include_directories(main PRIVATE
    ${ANDROID_NDK}/sources/android/native_app_glue/
)

target_link_libraries(main
    android
    log
    EGL
    GLESv3
    dl
)
